Decimal to Binary Conversion 您所在的位置:网站首页 decimal to binary chart Decimal to Binary Conversion

Decimal to Binary Conversion

2022-05-09 06:41| 来源: 网络整理| 查看: 265

Transcription

1 Decimal to Binary Conversion A tool that makes the conversion of decimal values to binary values simple is the following table. The first row is created by counting right to left from one to eight, for the basic eight bit positions. The table will work for any size binary value. The value row starts with one and doubles, Base 2, for each position to the left. Position: Value: The same conversion table and simple division can be used to convert binary values to decimal values. To convert 207 to binary: 1. Start with the digit farthest to the left. Determine if the decimal value can be divided by it. Since it will go one time, put a 1 in row three of the conversion table under the 128 value and calculate the remainder, Since the remainder can be divided by the next value, 64, put a 1 in row three under the 64 value of the table. 3. Since the remainder cannot be divided by either 32 or 16, put 0s in row three of our table under the 32 and 16 values. 4. Continue until there is no remainder. 5. If necessary, use row four to check the work. Position: Value: =207 Convert the following decimal values to binary values: a. 123

2 b. 202 c. 67 d. 7 e. 252 f. 91 g h i j Binary to Decimal Conversion To convert to decimal: 1. Enter the binary bits in row three. In this example Put the decimal values in row four only for the third row 1s. Technically the row two values are being multiplied by row three. 3. Now just add row four across. Position: Value: =185 Convert the following binary values to decimals: a b c d e f g h i j Hexadecimal Conversions The Hexadecimal (Hex) number system is used to refer to the binary numbers in a NIC or IPv6 address. The word hexadecimal comes from the Greek word for 16. Hexadecimal is often abbreviated

3 "0x", zero and lower case x. Hex numbers use 16 unique digits to display any combination of eight binary digits as only two hexadecimal digits. A Byte, or 8 bits, can range from to A Byte can create 256 combinations with decimal values ranging from 0 to 255 or Hex values 0 to FF. Each Hex value represents only four binary bits. The alpha (A-F) values are not case sensitive. A tool that makes the conversion of hexadecimal to decimal values simple is the following table. Use the same techniques as covered in binary to decimal conversions. The first row is the two Hex positions. The value row starts as 1 and 16, base 16, for each position to the left. Position: 2 1 Value: 16 1 Hexadecimal to decimal conversion: 1. Break the Hex value into pairs. Start at the right side. For example 77CE becomes 77 and CE. Insert a zero in the first position if necessary to complete the first pair. 2. Put each Hex pair in row three. The value in parenthesis is the decimal value of A-F. 3. To get the decimal values in row four, multiply the row two values with row three. 4. Now just add row four across. Position: 2 1 Value: =119 Position: 2 1 Value: 16 1 C(12) E(14) =206 Decimal to hexadecimal conversion: 1. To be valid for the purpose of this lab, the decimal value will be between 0 and 256. The first Hex value is derived by dividing the decimal value by 16. If the value is greater than 9 it will need to be put in Hex form A-F. 2. The second value is the remainder from step 1. If the value is greater than 9 it will need to be put in Hex form A-F.

4 3. For example, 209 divided by 16 is 13 with a remainder of equals D in Hex. Therefore, 209 equals D1. Hexadecimal to binary conversion: This is the easiest conversion. Remember that each Hex value converts to four binary bits, so work right to left. 1. For example, to convert 77AE to binary. Start with E. Use the table at the end of this exercise to go directly to binary. The other alternative is to convert the value to decimal, E = 14, and then use the last four positions of the table used in the decimal to binary conversions. 14 divided by 8 is 1 with a remainder of 6. 6 divided by 4 is 1 with a remainder of 2. 2 divided by 2 is 1 with no remainder. Add zeros if necessary to end up with four bits. Position: Value: =14 2. Using the same technique, A becomes 1010 and the total so far is Continuing using the same technique, the two 7s becomes 0111 and the total is Binary to hexadecimal conversion: 1. Each Hex value equals four binary bits. Start by breaking the binary value into 4-bit units from right to left. Add any leading zeros required to end up with all 4-bit values would become Use the table at the end of this exercise to go directly to Hex. The other alternative is to convert each 4-bit binary value to decimal, Then convert the decimal to Hex, 0-F. Position: Value: =12 or C Position: Value: =14 or E

5 The result is 6E-EC. Convert the following values to the other two forms: Decimal Hex Binary a9 FF Bad1 E7-63-1C Table decimal-hexadecimal-binary conversion: Dec Hex Binary

6 10 A B C D E F 1111



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有